package com.etlmaster.executor.steps.extract;

import java.util.Map;

import com.etlmaster.executor.Step;
import com.etlmaster.executor.StepMeta;
import com.etlmaster.executor.annotation.StepInstruction;
import com.etlmaster.executor.utils.DataCollectionUtils;

/**
 * @author Wugf
 * @date 2016-03-08
 */
@StepInstruction("removeHdfsPath")
public class RemoveHdfsDirStep  extends Step {

	private RemoveHdfsDirStepMeta meta;
	
	
	public RemoveHdfsDirStep(StepMeta meta) {
		super(meta);
		this.meta=(RemoveHdfsDirStepMeta) meta;
		// TODO Auto-generated constructor stub
	}

	@Override
	protected int handle() {
		String removeHdfsDir_cmd=DataCollectionUtils.getProperties("removeHdfsDir_cmd");
		Map<String,Object> map=ExtractUtil.getMap(meta);
		removeHdfsDir_cmd=ExtractUtil.replace(removeHdfsDir_cmd, map);
		return ExtractUtil.execute(removeHdfsDir_cmd);
		
	}

	@Override
	public boolean stop() {
		// TODO Auto-generated method stub
		return false;
	}

}
